package com.gsp.boot.controller;

import com.gsp.boot.bean.ConfigBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {
    @Value("${my.name}")
    private String name;
    @Value("${my.age}")
    private String age;

    @Autowired
    private ConfigBean bean;

    @RequestMapping("my_info")
    public String myInfo(){
        return "name:"+name+"  age:"+age+
                "max:"+bean.getMax()+"  value:"+bean.getValue()+
                "greeting:"+bean.getGreeting()+"  uuid:"+bean.getUuid();
    }
}
